package com.ssmTest.dao;

import com.ssmTest.model.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IUserDao {
    User selectUser(int id);

    User selectUserPhone(String phone_number);

    List<User> selectUserByState(int state);

    List<User> selectUserByStates();

    int numberOfUser(int state);

    int numberOfUsers(@Param("startdate") String startdate, @Param("enddate") String enddate);

    void insertUser(User user);

    void updateUser(User user);

    void updateUserState(User user);

    void updateUserFailReasion(User user);

    void updatePasswd(User user);

    void updateIDCard(@Param("id") int id, @Param("id_card") String id_card, @Param("id_number") String id_number);

    void updateGateway(@Param("id") int id, @Param("gateway") String gateway);

    void updateLicense(@Param("id") int id, @Param("driving_license") String driving_license);

    User selectInvitCode(String invitation_code);

    List<User> selectUserByInvitCode(String invitation_code);
}
